package cn.zymall.common.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@Data
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "seckill_spu")
public class SeckillSpu extends BaseEntity implements Serializable {
    /**
     * 抢购商品编号
     */
    @TableId(value = "SPU_ID", type = IdType.AUTO)
    private Integer spuId;

    /**
     * 抢购商品名称
     */
    @TableField(value = "SPU_NAME")
    private String spuName;

    /**
     * 商品类型编号
     */
    @TableField(value = "SPU_TYPE_ID")
    private Integer spuTypeId;

    /**
     * 商品市场价
     */
    @TableField(value = "SPU_MONEY")
    private Double spuMoney;

    /**
     * 店铺编号
     */
    @TableField(value = "MERCHANT_ID")
    private Integer merchantId;

    /**
     * 商品状态(1审核中,2上架,3未上架,0未审核)
     */
    @TableField(value = "SPU_STATUS")
    private Byte spuStatus;

    /**
     * 商品描述
     */
    @TableField(value = "SPU_DESC")
    private String spuDesc;

    /**
     * 创建时间
     */
    @TableField(value = "SPU_CREATE_TIME")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8")
    private Date spuCreateTime;

    /**
     * 商品收藏数量(默认为0)
     */
    @TableField(value = "SPU_COLLECT_NUM")
    private Integer spuCollectNum;

    /**
     * 商品评论数量(默认为0)
     */
    @TableField(value = "SPU_COMMENT_NUM")
    private Integer spuCommentNum;

    /**
     * 商品销量(默认为0)
     */
    @TableField(value = "SPU_SALE_NUM")
    private Integer spuSaleNum;

    /**
     * 店铺商品分类编号
     */
    @TableField(value = "MERCHANT_SPU_TYPE_ID")
    private Integer merchantSpuTypeId;

    /**
     * 计量
     */
    @TableField(value = "SPU_METERAGE")
    private String spuMeterage;

    /**
     * 重量
     */
    @TableField(value = "SPU_WEIGHT")
    private Long spuWeight;

    /**
     * 商品关键字
     */
    @TableField(value = "SPU_KEYWORD")
    private String spuKeyword;

    /**
     * 品牌编号
     */
    @TableField(value = "SPU_BRAND_ID")
    private Integer spuBrandId;

    /**
     * 商品详情
     */
    @TableField(value = "SPU_DETAIL")
    private String spuDetail;

    /**
     * 创建人
     */
    @TableField(value = "CREATE_BY")
    private Integer createBy;

    /**
     * 更新人
     */
    @TableField(value = "UPDATE_BY")
    private Integer updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "UPDATE_TIME")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8")
    private Date updateTime;

    /**
     * 当前库存
     */
    @TableField(exist = false)
    private Integer sum;

    private static final long serialVersionUID = 1L;

    public static final String COL_SPU_ID = "SPU_ID";

    public static final String COL_SPU_NAME = "SPU_NAME";

    public static final String COL_SPU_TYPE_ID = "SPU_TYPE_ID";

    public static final String COL_SPU_MONEY = "SPU_MONEY";

    public static final String COL_MERCHANT_ID = "MERCHANT_ID";

    public static final String COL_SPU_STATUS = "SPU_STATUS";

    public static final String COL_SPU_DESC = "SPU_DESC";

    public static final String COL_SPU_CREATE_TIME = "SPU_CREATE_TIME";

    public static final String COL_SPU_COLLECT_NUM = "SPU_COLLECT_NUM";

    public static final String COL_SPU_COMMENT_NUM = "SPU_COMMENT_NUM";

    public static final String COL_SPU_SALE_NUM = "SPU_SALE_NUM";

    public static final String COL_MERCHANT_SPU_TYPE_ID = "MERCHANT_SPU_TYPE_ID";

    public static final String COL_SPU_METERAGE = "SPU_METERAGE";

    public static final String COL_SPU_WEIGHT = "SPU_WEIGHT";

    public static final String COL_SPU_KEYWORD = "SPU_KEYWORD";

    public static final String COL_SPU_BRAND_ID = "SPU_BRAND_ID";

    public static final String COL_SPU_DETAIL = "SPU_DETAIL";

    public static final String COL_CREATE_BY = "CREATE_BY";

    public static final String COL_UPDATE_BY = "UPDATE_BY";

    public static final String COL_UPDATE_TIME = "UPDATE_TIME";
}
